#nullable enable

using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace PHMEE.EnergyEfficiency;

public interface IGpsTdRepository
{
    Task<GpsTde?> LatestOrDefaultAsync(Guid vesselId, DateTime startDateTimeUtc, DateTime endDateTimeUtc);
    
    Task<GpsTde?> LatestOrDefaultAsync(Guid vesselId, DateTime dateTimeUtc);

    /// <summary>
    /// 查询子表是否存在
    /// </summary>
    /// <param name="vesselId"></param>
    /// <returns></returns>
    Task<bool> IsSubTableExistAsync(Guid vesselId);

    Task<List<GpsTde>> GetListCloseOpenAscAsync(Guid vesselId, DateTime startDateTimeUtc, DateTime endDateTimeUtc);

    /// <summary>
    /// 查询航程列表
    /// </summary>
    /// <param name="vesselId"></param>
    /// <param name="startDateTimeUtc"></param>
    /// <param name="endDateTimeUtc"></param>
    /// <returns></returns>
    Task<List<float>> GetDistancesCloseOpenAsync(Guid vesselId, DateTime startDateTimeUtc,
        DateTime endDateTimeUtc);
}